<?php
/* SVN FILE: $Id$ */
/* TimeEntry Test cases generated on: 2009-09-16 21:38:07 : 1253129887*/
App::import('Model', 'TimeEntry');

class TimeEntryTestCase extends CakeTestCase {
	var $TimeEntry = null;
	var $fixtures = array('app.time_entry', 'app.timesheet', 'app.project');

	function startTest() {
		$this->TimeEntry =& ClassRegistry::init('TimeEntry');
	}

	function testTimeEntryInstance() {
		$this->assertTrue(is_a($this->TimeEntry, 'TimeEntry'));
	}

	function testTimeEntryFind() {
		$this->TimeEntry->recursive = -1;
		$results = $this->TimeEntry->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('TimeEntry' => array(
			'timesheet_id'  => 1,
			'project_id'  => 1,
			'entry_date'  => '2009-09-16',
			'billable_hours'  => 1,
			'unbillable_hours'  => 1,
			'created'  => '2009-09-16 21:38:05',
			'modified'  => '2009-09-16 21:38:05'
		));
		$this->assertEqual($results, $expected);
	}
}
?>
